
<link href="<{$res_url}>/css/wap/public.css" rel="stylesheet" type="text/css">
<link href="<{$res_url}>/css/wap/home.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<{$res_url}>/js/wap/jquery.min.js"></script>
<!--<script type="text/javascript" src="<{$res_url}>/js/wap/jquery.cityselect.js"></script>-->
<script type="text/javascript">
//	$(function(){
//		$("#city_4").citySelect({
//                        url:"",
//			prov:"", 
//			city:"",
//			dist:"",
//			nodata:"none",
//			required:false
//		}); 
//	});
        $(function(){
            getProvince();
        })
        function getProvince(){
            var province = $("[name=province]").val();
            var str = "";
            if(province){
                $.get("amember-getregions-"+province+".html",function(_data){
                    
                    $.each(_data,function(k,val){
                        str += "<option value='"+val.region_id+"'>"+val.local_name+"</option>"
                    });
                    
                    $("#city").attr("disabled",false);
                    $("#city").html(str);
                    
                },'json');
            }else{
                $("#city").html(str);
            }
        }
        function getCity(){
            var city = $("[name=city]").val();
            var str = "";
            if(city){
                $.get("amember-getregions-"+city+".html",function(_data){
                    
                    $.each(_data,function(k,val){
                        str += "<option value='"+val.region_id+"'>"+val.local_name+"</option>"
                    });
                    
                    $("#district").attr("disabled",false);
                    $("#district").html(str);
                    
                },'json');
            }else{
                $("#district").html(str);
            }
            
        }
</script>
</head>

<body>
	
    <section class="warp">
    	<div class="content">
<!--            <header>
            	<div class="search fl"><a href="#"><img src="<{$res_url}>/images/wap/icon1.png" width="20"></a></div>
                <div class="logo">编辑收货地址</div>
                <div class="position fr"><a href="#">删除</a></div>
            </header>-->
            
            <section class="edit_address">
            	<form name='addform' action='amember-addrupdate.html' method='post'>
                    <ul id="city_4">
                        <li>
                            <p><label for="name">收货人：</label></p>
                            <input name="name" id="name" type="text" value='<{$addrs.name}>' placeholder="收货人姓名">
                        </li>
                        <li>
                            <p><label for="phone">联系电话：</label></p>
                            <input name="phone" id="phone" type="text" value='<{$addrs.phone.mobile}>' placeholder="联系人电话">
                        </li>
                        <li>
                            <p><span><img src="<{$res_url}>/images/wap/icon10.png"></span><label for="province">省份：</label></p>
                            <select name="province" id="province" class="prov" onchange='getProvince()'>
                                <option value=''>请选择</option>
                                <{foreach from=$regions.p item=pr}>
                                <option value='<{$pr.region_id}>' <{if $city.1==$pr.region_id}>selected<{/if}>><{$pr.local_name}></option>
                                <{/foreach}>
                            </select>
                        </li>
                        <li>
                            <p><span><img src="<{$res_url}>/images/wap/icon10.png"></span><label for="city">城市：</label></p>
                            <select name="city" id="city" class="city"  onchange='getCity()'>
                                <option value=''>请选择</option>
                                <{if $regions.c}><{foreach from=$regions.c item=ci}>
                                <option value='<{$ci.region_id}>' <{if $city.2==$ci.region_id}>selected<{/if}>><{$ci.local_name}></option>
                                <{/foreach}>
                                <{/if}>
                            </select>
                        </li>
                        <li>
                            <p><span><img src="<{$res_url}>/images/wap/icon10.png"></span><label for="district">区/县：</label></p>
                            <select name="district" id="district" class="dist">
                                <option value=''>请选择</option>
                                <{if $regions.d}><{foreach from=$regions.d item=di}>
                                <option value='<{$di.region_id}>' <{if $city.3==$di.region_id}>selected<{/if}>><{$di.local_name}></option>
                                <{/foreach}>
                                <{/if}>
                                
                            </select>
                        </li>
                        <li>
                            <p><label for="deta_address">详细地址：</label></p>
                            <input name="deta_address" type="text" value='<{$addrs.addr}>' placeholder="详细地址" id="deta_address">
                        </li>
                        <li>
                            <p><label for="ID_card">身份证号码：</label></p>
                            <input name="ID_card" type="text" value='<{$addrs.card_num}>' placeholder="身份证号码" id="ID_card">
                        </li>
                        <li><em>* 根据政策要求，用户必须填写收货人身份证号</em></li>
                        
                        <li><input type="hidden" value="<{$addrs.addr_id}>" name='addr_id'><a href='javascript:;' onclick='$("form").submit();'>保存收货信息</a></li>
                    </ul>
                </form>
            </section>
            
        </div>
    </section>
